set(SOURCE "init.c" ${SCNS_SOURCE} ${SCNS_BSP_SOURCE} ${JCTO_SOURCE} ${HXPRINTF_SOURCE})
message(STATUS ${SOURCE})
add_executable(lcdTest "lcdTest.c" ${SOURCE})
add_executable(bmpTest "bmpTest.c" ${SOURCE})
add_executable(ccmTest "ccmTest.c" ${SOURCE})

include(CheckIPOSupported)
check_ipo_supported(RESULT supported OUTPUT error)
if (supported)
    message(STATUS "IPO / LTO enabled")
    get_property(target_names DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY BUILDSYSTEM_TARGETS)
    while (target_names)
        list(POP_BACK target_names target)
        message(STATUS ${target})
        set_property(TARGET ${target} PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
    endwhile ()
endif ()
